<?php

/**
 * Created by PhpStorm.
 * Author: ls
 * Time: 2023/10/16 15:48
 * Desc: 导游
 */
class Request_Api_V2_Guide extends Request_Api_V2_Base
{
    public function __construct($request_param)
    {
        parent::__construct($request_param);
    }

    public function recommend()
    {
        $this->rules = [
            ['page', ['digit', $this->rule_min(1)]],
            ['pagesize', ['digit', $this->rule_min(1)]],
        ];

        return $this;
    }

    public function query()
    {
        $this->rules = [
            ['page', ['not_empty', 'digit', $this->rule_min(1)]],
            ['pagesize', ['not_empty', 'digit', $this->rule_min(1)]],
        ];

        return $this;
    }

    public function get_guide_service()
    {
        $this->rules = [
            ['page', ['not_empty', 'digit', $this->rule_min(1)]],
            ['pagesize', ['not_empty', 'digit', $this->rule_min(1)]],
            ['guide_id', ['not_empty', 'digit', $this->rule_min(1)]],
        ];

        return $this;
    }

    public function get_service_info()
    {
        $this->rules = [
            ['id', ['not_empty', 'digit', $this->rule_min(1)]],
        ];

        return $this;
    }

    public function info()
    {
        $this->rules = [
            ['id', ['not_empty', 'digit', $this->rule_min(1)]],
        ];

        return $this;
    }

    public function calendar()
    {
        $this->rules = [
            ['service_id', ['not_empty', 'digit', $this->rule_min(1)]],
        ];

        return $this;
    }

    public function add_order()
    {
        $this->rules = [
            ['product_id', ['not_empty', 'digit', $this->rule_min(1)]],
            ['linkman', ['not_empty']],
            ['linktel', ['not_empty', 'phone']],
            ['linkemail', ['email']],
            ['source', ['not_empty', 'digit', $this->rule_min(0)]],
            ['usedate', ['not_empty', $this->rule_date_format("Y-m-d")]],
        ];

        $this->validation->rule('mid',array('Rule_Member','need_member'));

        return $this;
    }


}